/*	BASIC INTERRUPT VECTOR TABLE FOR STM8 devices
 *	Copyright (c) 2007 STMicroelectronics
 */

typedef void @far (*interrupt_handler_t)(void);

struct interrupt_vector {
	unsigned char interrupt_instruction;
	interrupt_handler_t interrupt_handler;
};

@far @interrupt void NonHandledInterrupt (void)
{
	/* in order to detect unexpected events during development, 
	   it is recommended to set a breakpoint on the following instruction
	*/
	return;
}

extern void _stext();     /* startup routine */
extern void @far TRAP_IRQHandler(void);
extern void @far TLI_IRQHandler (void);
extern void @far AWU_IRQHandler (void);
extern void @far CLK_IRQHandler (void);
extern void @far EXTI_PORTA_IRQHandler (void);
extern void @far EXTI_PORTB_IRQHandler (void);
extern void @far EXTI_PORTC_IRQHandler (void);
extern void @far EXTI_PORTD_IRQHandler (void);
extern void @far EXTI_PORTE_IRQHandler (void);
extern void @far CAN_RX_IRQHandler (void);
extern void @far CAN_TX_IRQHandler (void);
extern void @far SPI_IRQHandler (void);
extern void @far TIM1_UPD_OVF_TRG_BRK_IRQHandler (void);
extern void @far TIM1_CAP_COM_IRQHandler (void);
extern void @far TIM2_UPD_OVF_BRK_IRQHandler (void);
 extern void @far TIM2_CAP_COM_IRQHandler (void);
extern void @far TIM3_UPD_OVF_BRK_IRQHandler (void);
extern void @far TIM3_CAP_COM_IRQHandler (void);
extern void @far USART_TX_IRQHandler (void);
extern void @far USART_RX_IRQHandler (void);
extern void @far I2C_IRQHandler (void);
extern void @far LINUART_TX_IRQHandler (void);
 extern void @far LINUART_RX_IRQHandler (void);
extern void @far ADC_IRQHandler (void);
 extern void @far TIM4_UPD_OVF_IRQHandler (void);
extern void @far EEPROM_EEC_IRQHandler (void);
struct interrupt_vector const _vectab[] = {
	{0x82, (interrupt_handler_t)_stext}, /* reset */
	{0x82, TRAP_IRQHandler}, /* trap  */
	{0x82, TLI_IRQHandler}, /* irq0  */
	{0x82, AWU_IRQHandler}, /* irq1  */
	{0x82, CLK_IRQHandler}, /* irq2  */
	{0x82, EXTI_PORTA_IRQHandler}, /* irq3  */
	{0x82, EXTI_PORTB_IRQHandler}, /* irq4  */
	{0x82, EXTI_PORTC_IRQHandler }, /* irq5  */
	{0x82, EXTI_PORTD_IRQHandler }, /* irq6  */
	{0x82, EXTI_PORTE_IRQHandler }, /* irq7  */
	{0x82, CAN_RX_IRQHandler}, /* irq8  */
	{0x82, CAN_TX_IRQHandler}, /* irq9  */
	{0x82, SPI_IRQHandler}, /* irq10 */
	{0x82, TIM1_UPD_OVF_TRG_BRK_IRQHandler}, /* irq11 */
	{0x82, TIM1_CAP_COM_IRQHandler}, /* irq12 */
	{0x82, TIM2_UPD_OVF_BRK_IRQHandler}, /* irq13 */
	{0x82, TIM2_CAP_COM_IRQHandler}, /* irq14 */
	{0x82, TIM3_UPD_OVF_BRK_IRQHandler}, /* irq15 */
	{0x82, TIM3_CAP_COM_IRQHandler}, /* irq16 */
	{0x82, USART_TX_IRQHandler }, /* irq17 */
	{0x82, USART_RX_IRQHandler}, /* irq18 */
	{0x82, I2C_IRQHandler}, /* irq19 */
	{0x82, LINUART_TX_IRQHandler}, /* irq20 */
	{0x82, LINUART_RX_IRQHandler}, /* irq21 */
	{0x82, ADC_IRQHandler}, /* irq22 */
	{0x82, TIM4_UPD_OVF_IRQHandler}, /* irq23 */
	{0x82, EEPROM_EEC_IRQHandler}, /* irq24 */
	{0x82, NonHandledInterrupt}, /* irq25 */
	{0x82, NonHandledInterrupt}, /* irq26 */
	{0x82, NonHandledInterrupt}, /* irq27 */
	{0x82, NonHandledInterrupt}, /* irq28 */
	{0x82, NonHandledInterrupt}, /* irq29 */
};
